package com.example.demo.base;

public abstract class Animal {

    public IService iService;

    public Animal(IService service) {
        iService = service;
    }

    void eat(){
        System.out.println("你大爷，是个动物都会吃");
    }

    /**
     * 是否哺乳动物，默认不是
     * @return
     */
    boolean isMammal(){
        return false;
    }


    void special(){
        iService.action();
    }
}
